import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/HomeFirst.vue";
import ShowShopsL from "../views/ShowShopsL.vue";
import Nearly from "../views/NearlyCity.vue";
import ShopsL from "../views/ShopsL.vue";
// import ShowRightL from "../views/ShowRightL.vue"
import Login from "../views/Login.vue";
import Mine from "../views/Mine.vue"
// import Login from "../views/LoginL.vue";
import Swiper from "../views/swiper.vue";
import Order from "../views/Order.vue";
import chooseaddr from "../views/chooseaddr.vue";
import addaddr from "../views/addaddr.vue";
import remark from "../views/remark.vue";
import check from "../views/Check.vue";
import getorder from "../views/getorder.vue";
import accountmessage from "../views/accountmessage.vue"
Vue.use(VueRouter);
import favourable from "../views/favourable.vue"
import ConvertRed from "../views/ConvertRed.vue"
import goHistory from "../views/goHistory.vue"
import Myremain from "../views/Myremain.vue"
import Mygrade from "../views/Mygrade.vue"
import Mycard from "../views/Mycard.vue"
import Myservice from "../views/Myservice.vue"
import servicecontent from "../views/servicecontent.vue"
import mygradeshop from "../views/mygradeshop.vue"
import about from "../views/About.vue"
import Menu from "../views/Menu.vue"
const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
    redirect: "/home",
    meta: {
      deep: 2,
    },
    children: [
      {
        path: "home",
        name: "HomeFirst",
        component: () => import("../views/HomeFirst.vue"),
        meta: {
          deep: 1,
        },
      },
    ]
  },
  {//登录页面
    path: "/login",
    name: "Login",
    component: Login,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/Mycard",
    name: "Mycard",
    component: Mycard,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/about",
    name: "About",
    component: about,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/servicecontent",
    name: "Servicecontent",
    component: servicecontent,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/mygradeshop",
    name: "Mygradeshop",
    component: mygradeshop,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/accountmessage",
    name: "Accountmessage",
    component: accountmessage,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/Myservice",
    name: "Myservice",
    component: Myservice,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/Myremain",
    name: "Myremain",
    component: Myremain,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/Mygrade",
    name: "Mygrade",
    component: Mygrade,
    meta: {
      deep: 2,
    },

  },
  {
    path: "/ConvertRed",
    name: "ConvertRed",
    component: ConvertRed,
    meta: {
      deep: 2,
    },

  },
  {//登录页面
    path: "/favourable",
    name: "Favourable",
    component: favourable,
    meta: {
      deep: 2,
    },
  },
  {//订单页
    path: "/menu",
    name: "Menu",
    component: Menu,
    meta: {
      deep: 1,
    },
  },
  {//收获地址页面
    path: "/order",
    name: "Order",
    component: Order,
    meta: {
      deep: 2,
    },

  },
  {//选择地址页面
    path: "/chooseaddr",
    name: "chooseaddr",
    component: chooseaddr,
    meta: {
      deep: 2,
    },
  },
  {//增加地址页面
    path: "/addaddr",
    name: "addaddr",
    component: addaddr,
    meta: {
      deep: 2,
    },
  },
  {
    path: "/goHistory",
    name: "GoHistory",
    component: goHistory,
    meta: {
      deep: 2,
    },
  },
  {//增加地址页面
    path: "/check",
    name: "Check",
    component: check,
    meta: {
      deep: 2,
    },
  },
  {
    path: "/remark",
    name: "Remark",
    component: remark,
    meta: {
      deep: 2,
    },
  },
  {
    path: "/getorder",
    name: "Getorder",
    component: getorder,
    meta: {
      deep: 2,
    },
  },
  {//根据城市选择附近的某个地方
    path: "/nearly/:id",
    name: "nearly",
    component: Nearly,
    meta: {
      deep: 2,
    },
  },
  {//获取商铺分类详情
    path: "/shops",
    name: "Shops",
    component: ShopsL,
    meta: {
      deep: 2,
    },
  },
  {//获取商铺分类详情
    path: "/swiper",
    name: "Swiper",
    component: Swiper,
    meta: {
      deep: 2,
    },
  },
  {
    path: "/mine",
    name: "Mine",
    component: Mine,
    meta: {
      deep: 2,
    },
  },
  {
    path: "/show",
    name: "ShowShopsL",
    component: ShowShopsL,
    meta: {
      deep: 2,
    },
  },

];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
